<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib uri="/struts-tags"  prefix="s" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <base href="<%=basePath%>">
  <title>系统管理平台</title>
<link href="./dwz/themes/css/login.css" rel="stylesheet" type="text/css" />
	<script type='text/javascript' src='/DwzSystem/dwr/engine.js'></script>
    <script type='text/javascript' src='/DwzSystem/dwr/interface/customerAction.js'></script>
    <script type='text/javascript' src='/DwzSystem/dwr/util.js'></script>
 <script type="text/javascript">  
     function CheckCustomer(){
	       var name = $("username").value;
	       if(name==""){
		       alert("用户名不能为空");
		       $("username").focus();
		       return false;
	       }else {
	    	  // customerAction.checkCustomerWithName(name,callbackMsg);
	       }
		}
		function callbackMsg(msg){
			  
			        $("result").innerHTML=msg;
		}  

		//更新验证码
		function change_yzm(image) {
			document.getElementById(image).src = "randomImage.action" + "?random="+ Math.random();
		}
    </script>
</head>



<body>
	<div id="login">
		<div id="login_header">
			<h1 class="login_logo">
				<a href="http://demo.dwzjs.com"><img src="./dwz/themes/default/images/login_logo.gif" /></a>
			</h1>
			<div class="login_headerContent">
				<div class="navList">
					<ul>
						<li><a href="index.jsp">首页</a></li>
						<li><a href="#">关于</a></li>
						<li><a href="#" target="_blank">帮助</a></li>
					</ul>
				</div>
				<h2 class="login_title"><img src="./dwz/themes/default/images/login_title.png" /></h2>
			</div>
		</div>
		<div id="login_content">
			<div class="loginForm">
				<form action="user.action">
				<span class="STYLE4">${errorInfo}</span>
					<p>
						<label>用户名：</label>
						<input type="text" id="username" name="user.username" size="20" class="login_input" value="u0" onBlur="CheckUser()"/>
						<span id="result"></span>
					</p>
					<p>
						<label>密码：</label>
						<input type="password" name="user.password" size="20" value="123" class="login_input" />
					</p>
					<p>
						<label>验证码：</label>
						<input class="code" name="randomCode" id="randomCode" type="text" size="5" />
						<span><img id='yzm_img' onClick="change_yzm('yzm_img');" src="randomImage.action" width="75" height="24"/></span>
					</p>
					<%--<p>
					 <input  type="radio" name="customer.cus_type" value="1"/><span class="STYLE3">管理员</span>
				     <input type="radio" name="customer.cus_type" value="2" checked/><span class="STYLE3">客户</span>
					</p>
					--%><div class="login_bar">
						<input class="sub" type="submit" value=" " />
					</div>
				</form>
			</div>
			<div class="login_banner"><img src="./dwz/themes/default/images/login_banner.jpg" /></div>
			<div class="login_main">
				<ul class="helpList">
					<li><a href="#">下载驱动程序</a></li>
					<li><a href="#">如何安装密钥驱动程序？</a></li>
					<li><a href="#">忘记密码怎么办？</a></li>
					<li><a href="#">为什么登录失败？</a></li>
				</ul>
				<div class="login_inner">
					<p>溯源，即追本溯源，探寻事物的根本、源头</p>
					<p>溯源系统可以实现所有批次产品从原料到成品、从成品到原料100%的双向追溯功能</p>
					<p>监管人员就能够通过该系统判断企业是否存在过失行为</p>
				</div>
			</div>
		</div>
		<div id="login_footer">
			Copyright &copy; 2013 www.teasource.com.
		</div>
	</div>
</body>
</html>